package cn.tcmp.controller;

import cn.tcmp.entity.Detail;
import cn.tcmp.service.DetailService;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController
public class DetailController {

    @Autowired
    private DetailService detailService;

    @RequestMapping(value = "queryAll", method = RequestMethod.GET
            , produces = {"application/json;charset=utf-8"})
    public String queryAll(@RequestParam("sortId") Integer sortId) {
        return JSON.toJSONString(detailService.queryAll(sortId));
    }




}
